from math import factorial

def compostionNum(n, m):
    return factorial(m) // (factorial(n) * factorial(m - n))

class Solution:
    def getRow(self, rowIndex):
        """
        :type rowIndex: int
        :rtype: List[int]
        """
        
        if rowIndex == 0:
            return [1]
        res = []
        for i in range(rowIndex + 1):
            res.append(compostionNum(i, rowIndex))
        
        return res

s = Solution()
print(compostionNum(1, 3))
print('ss', s.getRow(5))

